/**
 * 
 */
package com.jw.server.model;

import javax.persistence.Entity;

import cn.ydx.protobuf.OTIpcDef;

/**
 * @author Jason Biao
 *
 *         网约车驾驶员基本信息接口
 */
@Entity
public class BaseInfoDriver extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5112602418044045610L;

	private int address;

	private String driverPhone;

	private String driverGender;

	private int driverBirthday;

	private String driverNation;

	private String driverContactAddress;

	private String licenseId;

	private int getDriverLicenseDate;

	private int driverLicenseOn;

	private int driverLicenseOff;

	private int taxiDriver;

	private String certificateNo;

	private String networkCarIssueOrganization;

	private int networkCarIssueDate;

	private int getNetworkCarProofDate;

	private int networkCarProofOn;

	private int networkCarProofOff;

	private int registerDate;

	private int commercialType;

	private String contractCompany;

	private int contractOn;

	private int contractOff;

	private int state;

	private String driverName;

	private String driverNationLity;

	private String driverMaritalStatus;

	private String driverLanguageLevel;

	private String driverEducation;

	private String driverCensus;

	private String driverAddress;

	private String photoId;

	private String licensePhotoId;

	private String driverType;

	private int fullTimeDriver;

	private int inDriverBlackList;

	private String emergencyContact;

	private String emergencyContactPhone;

	private String emergencyContaceAddress;

	public String getDriverName() {
		return driverName;
	}

	public void setDriverName(String driverName) {
		this.driverName = driverName;
	}

	public String getDriverNationLity() {
		return driverNationLity;
	}

	public void setDriverNationLity(String driverNationLity) {
		this.driverNationLity = driverNationLity;
	}

	public String getDriverMaritalStatus() {
		return driverMaritalStatus;
	}

	public void setDriverMaritalStatus(String driverMaritalStatus) {
		this.driverMaritalStatus = driverMaritalStatus;
	}

	public String getDriverLanguageLevel() {
		return driverLanguageLevel;
	}

	public void setDriverLanguageLevel(String driverLanguageLevel) {
		this.driverLanguageLevel = driverLanguageLevel;
	}

	public String getDriverEducation() {
		return driverEducation;
	}

	public void setDriverEducation(String driverEducation) {
		this.driverEducation = driverEducation;
	}

	public String getDriverCensus() {
		return driverCensus;
	}

	public void setDriverCensus(String driverCensus) {
		this.driverCensus = driverCensus;
	}

	public String getDriverAddress() {
		return driverAddress;
	}

	public void setDriverAddress(String driverAddress) {
		this.driverAddress = driverAddress;
	}

	public String getPhotoId() {
		return photoId;
	}

	public void setPhotoId(String photoId) {
		this.photoId = photoId;
	}

	public String getLicensePhotoId() {
		return licensePhotoId;
	}

	public void setLicensePhotoId(String licensePhotoId) {
		this.licensePhotoId = licensePhotoId;
	}

	public String getDriverType() {
		return driverType;
	}

	public void setDriverType(String driverType) {
		this.driverType = driverType;
	}

	public int getFullTimeDriver() {
		return fullTimeDriver;
	}

	public void setFullTimeDriver(int fullTimeDriver) {
		this.fullTimeDriver = fullTimeDriver;
	}

	public int getInDriverBlackList() {
		return inDriverBlackList;
	}

	public void setInDriverBlackList(int inDriverBlackList) {
		this.inDriverBlackList = inDriverBlackList;
	}

	public String getEmergencyContact() {
		return emergencyContact;
	}

	public void setEmergencyContact(String emergencyContact) {
		this.emergencyContact = emergencyContact;
	}

	public String getEmergencyContactPhone() {
		return emergencyContactPhone;
	}

	public void setEmergencyContactPhone(String emergencyContactPhone) {
		this.emergencyContactPhone = emergencyContactPhone;
	}

	public String getEmergencyContaceAddress() {
		return emergencyContaceAddress;
	}

	public void setEmergencyContaceAddress(String emergencyContaceAddress) {
		this.emergencyContaceAddress = emergencyContaceAddress;
	}

	public int getAddress() {
		return address;
	}

	public void setAddress(int address) {
		this.address = address;
	}

	public String getDriverPhone() {
		return driverPhone;
	}

	public void setDriverPhone(String driverPhone) {
		this.driverPhone = driverPhone;
	}

	public String getDriverGender() {
		return driverGender;
	}

	public void setDriverGender(String driverGender) {
		this.driverGender = driverGender;
	}

	public int getDriverBirthday() {
		return driverBirthday;
	}

	public void setDriverBirthday(int driverBirthday) {
		this.driverBirthday = driverBirthday;
	}

	public String getDriverNation() {
		return driverNation;
	}

	public void setDriverNation(String driverNation) {
		this.driverNation = driverNation;
	}

	public String getDriverContactAddress() {
		return driverContactAddress;
	}

	public void setDriverContactAddress(String driverContactAddress) {
		this.driverContactAddress = driverContactAddress;
	}

	public String getLicenseId() {
		return licenseId;
	}

	public void setLicenseId(String licenseId) {
		this.licenseId = licenseId;
	}

	public int getGetDriverLicenseDate() {
		return getDriverLicenseDate;
	}

	public void setGetDriverLicenseDate(int getDriverLicenseDate) {
		this.getDriverLicenseDate = getDriverLicenseDate;
	}

	public int getDriverLicenseOn() {
		return driverLicenseOn;
	}

	public void setDriverLicenseOn(int driverLicenseOn) {
		this.driverLicenseOn = driverLicenseOn;
	}

	public int getDriverLicenseOff() {
		return driverLicenseOff;
	}

	public void setDriverLicenseOff(int driverLicenseOff) {
		this.driverLicenseOff = driverLicenseOff;
	}

	public int getTaxiDriver() {
		return taxiDriver;
	}

	public void setTaxiDriver(int taxiDriver) {
		this.taxiDriver = taxiDriver;
	}

	public String getCertificateNo() {
		return certificateNo;
	}

	public void setCertificateNo(String certificateNo) {
		this.certificateNo = certificateNo;
	}

	public String getNetworkCarIssueOrganization() {
		return networkCarIssueOrganization;
	}

	public void setNetworkCarIssueOrganization(
			String networkCarIssueOrganization) {
		this.networkCarIssueOrganization = networkCarIssueOrganization;
	}

	public int getNetworkCarIssueDate() {
		return networkCarIssueDate;
	}

	public void setNetworkCarIssueDate(int networkCarIssueDate) {
		this.networkCarIssueDate = networkCarIssueDate;
	}

	public int getGetNetworkCarProofDate() {
		return getNetworkCarProofDate;
	}

	public void setGetNetworkCarProofDate(int getNetworkCarProofDate) {
		this.getNetworkCarProofDate = getNetworkCarProofDate;
	}

	public int getNetworkCarProofOn() {
		return networkCarProofOn;
	}

	public void setNetworkCarProofOn(int networkCarProofOn) {
		this.networkCarProofOn = networkCarProofOn;
	}

	public int getNetworkCarProofOff() {
		return networkCarProofOff;
	}

	public void setNetworkCarProofOff(int networkCarProofOff) {
		this.networkCarProofOff = networkCarProofOff;
	}

	public int getRegisterDate() {
		return registerDate;
	}

	public void setRegisterDate(int registerDate) {
		this.registerDate = registerDate;
	}

	public int getCommercialType() {
		return commercialType;
	}

	public void setCommercialType(int commercialType) {
		this.commercialType = commercialType;
	}

	public String getContractCompany() {
		return contractCompany;
	}

	public void setContractCompany(String contractCompany) {
		this.contractCompany = contractCompany;
	}

	public int getContractOn() {
		return contractOn;
	}

	public void setContractOn(int contractOn) {
		this.contractOn = contractOn;
	}

	public int getContractOff() {
		return contractOff;
	}

	public void setContractOff(int contractOff) {
		this.contractOff = contractOff;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public static OTIpcDef.BaseInfoDriver convert(BaseInfoDriver data) {
		OTIpcDef.BaseInfoDriver item = OTIpcDef.BaseInfoDriver
				.newBuilder()
				.setCompanyId(data.getCompanyId())
				.setAddress(data.getAddress())
				.setDriverPhone(data.getDriverPhone())
				.setDriverGender(data.getDriverGender())
				.setDriverBirthday(Long.valueOf(data.getDriverBirthday()))
				.setDriverNation(data.getDriverNation())
				.setDriverContactAddress(data.getDriverContactAddress())
				.setLicenseId(data.getLicenseId())
				.setGetDriverLicenseDate(
						Long.valueOf(data.getGetDriverLicenseDate()))
				.setDriverLicenseOn(Long.valueOf(data.getDriverLicenseOn()))
				.setDriverLicenseOff(Long.valueOf(data.getDriverLicenseOff()))
				.setTaxiDriver(data.getTaxiDriver())
				.setCertificateNo(data.getCertificateNo())
				.setNetworkCarIssueOrganization(
						data.getNetworkCarIssueOrganization())
				.setNetworkCarIssueDate(
						Long.valueOf(data.getNetworkCarIssueDate()))
				.setGetNetworkCarProofDate(
						Long.valueOf(data.getGetNetworkCarProofDate()))
				.setNetworkCarProofOn(Long.valueOf(data.getNetworkCarProofOn()))
				.setNetworkCarProofOff(
						Long.valueOf(data.getNetworkCarProofOff()))
				.setRegisterDate(Long.valueOf(data.getRegisterDate()))
				.setCommercialType(data.getCommercialType())
				.setContractCompany(data.getContractCompany())
				.setContractOn(Long.valueOf(data.getContractOn()))
				.setContractOff(Long.valueOf(data.getContractOff()))
				.setState(data.getState()).setFlag(data.getFlag())
				.setUpdateTime(Long.valueOf(data.getUpdateTime()))
				.setDriverName(data.getDriverName())
				.setDriverNationality(data.getDriverNationLity())
				.setDriverMaritalStatus(data.getDriverMaritalStatus())
				.setDriverLanguageLevel(data.getDriverLanguageLevel())
				.setDriverEducation(data.getDriverEducation())
				.setDriverCensus(data.getDriverCensus())
				.setDriverAddress(data.getDriverAddress())
				.setPhotoId(data.getPhotoId())
				.setLicensePhotoId(data.getLicensePhotoId())
				.setDriverType(data.getDriverType())
				.setFullTimeDriver(data.getFullTimeDriver())
				.setInDriverBlacklist(data.getInDriverBlackList())
				.setEmergencyContact(data.getEmergencyContact())
				.setEmergencyContactPhone(data.getEmergencyContactPhone())
				.setEmergencyContactAddress(data.getEmergencyContaceAddress())

				.build();

		return item;
	}

	public static BaseInfoDriver convertPojo(OTIpcDef.BaseInfoDriver data) {
		BaseInfoDriver bid = new BaseInfoDriver();
		bid.setAddress(data.getAddress());
		bid.setCertificateNo(data.getCertificateNo());
		bid.setCommercialType(data.getCommercialType());
		bid.setCompanyId(data.getCompanyId());
		bid.setContractCompany(data.getContractCompany());
		bid.setContractOff((int) data.getContractOff());
		bid.setContractOn((int) data.getContractOn());
		bid.setDriverBirthday((int) data.getDriverBirthday());
		bid.setDriverContactAddress(data.getDriverContactAddress());
		bid.setDriverGender(data.getDriverGender());
		bid.setDriverLicenseOff((int) data.getDriverLicenseOff());
		bid.setDriverLicenseOn((int) data.getDriverLicenseOn());
		bid.setDriverNation(data.getDriverNation());
		bid.setDriverPhone(data.getDriverPhone());
		bid.setFlag(data.getFlag());
		bid.setGetDriverLicenseDate((int) data.getGetDriverLicenseDate());
		bid.setGetNetworkCarProofDate((int) data.getGetNetworkCarProofDate());
		bid.setLicenseId(data.getLicenseId());
		bid.setNetworkCarIssueDate((int) data.getNetworkCarIssueDate());
		bid.setNetworkCarIssueOrganization(data
				.getNetworkCarIssueOrganization());
		bid.setNetworkCarProofOff((int) data.getNetworkCarProofOff());
		bid.setNetworkCarProofOn((int) data.getNetworkCarProofOn());
		bid.setRegisterDate((int) data.getRegisterDate());
		bid.setState(data.getState());
		bid.setTaxiDriver(data.getTaxiDriver());
		bid.setUpdateTime(data.getUpdateTime());
        bid.setDriverName(data.getDriverName());
		bid.setDriverNationLity(data.getDriverNationality());
		bid.setDriverMaritalStatus(data.getDriverMaritalStatus());
		bid.setDriverLanguageLevel(data.getDriverLanguageLevel());
		bid.setDriverEducation(data.getDriverCensus());
		bid.setDriverAddress(data.getDriverAddress());
		bid.setPhotoId(data.getPhotoId());
		bid.setLicensePhotoId(data.getLicensePhotoId());
		bid.setDriverType(data.getDriverType());
		bid.setFullTimeDriver(data.getFullTimeDriver());
		bid.setInDriverBlackList(data.getInDriverBlacklist());
		bid.setEmergencyContact(data.getEmergencyContact());
		bid.setEmergencyContactPhone(data.getEmergencyContactPhone());
		bid.setEmergencyContaceAddress(data.getEmergencyContactAddress());
		
		return bid;
	}

}
